﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using YJKSparseDistance.ControlLayer;
using YJKSparseDisOfRoom.ModelLayer;
using YJKRevitKernel.ShortPathSuite;

namespace YJKSparseDisOfRoom.ControlLayer
{
    public class UseGraphCalculater : YJKRevitKernel.ShortPathSuite.UseGraphCalculater
	{
		public bool TryCalculateShortestPath(EndPointPacker_InRoom startPoint, EndPointPacker_InRoom endPoint, List<Curve> lstCurves, out List<XYZ> shortPath)
		{
			shortPath = this.m_UserCalculater.CalculateShortPath(startPoint, endPoint, lstCurves);
			return shortPath != null && shortPath.Count != 0;
		}

		private YJKSparseDistance.ControlLayer.ShortDistanceCalculater m_UserCalculater = new YJKSparseDistance.ControlLayer.ShortDistanceCalculater();
	}
}
